package com.indexingsystem.system.service;

import java.util.List;

import com.indexingsystem.boss.Vo.ContractInfoVo;
import com.indexingsystem.boss.Vo.TreeReqVo;
import com.indexingsystem.boss.common.PagedResult;
import com.indexingsystem.boss.entity.Invoices;

public interface InvoicesService {
	
	/**
	 * 通过订单Id获取发票信息数量
	 * @param orderId
	 * @return
	 */
	Integer selectInvoicesListCount(TreeReqVo treeReqVo);
	
	/**
	 * 通过订单Id获取发票信息
	 * @return
	 */
	PagedResult<Invoices> selectInvoicesListByOrderId(TreeReqVo treeReqVo);
	
	/**
	 * 根据合同id查询发票信息
	 * @param contractId
	 * @return
	 */
	PagedResult<Invoices> getInvoicesListByContractId(ContractInfoVo contractInfoVo);
	
	Integer getInvoicesListByContractIdCount(ContractInfoVo contractInfoVo);
	
	/**
	 * 根据发票Id获取发票信息
	 * @param invoiceId
	 * @return
	 */
	Invoices selectByPrimaryKey(String invoiceId);
	
	
	/**
	 * 通过发票编号获取发票详情.
	 * @param invoicesNo
	 * @return
	 */
	Invoices getInvoicesByInvoicesNo(String invoicesNo);
	
	/**
	 * 批量添加发票信息
	 * @param invoices
	 * @return
	 */
	int batchAddInvoices(List<Invoices> invoices);
	
	/**
	 * 添加发票
	 * @param record
	 * @return
	 */
	int insertSelective(Invoices record);
	
	/**
	 * 根据发票Id修改发票信息
	 * @param record
	 * @return
	 */
	int updateByPrimaryKeySelective(Invoices record);
	
	/**
	 * 通过订单Id删除所有发票信息
	 * @param orderId
	 * @return
	 */
	int deleteInvoicesByOrderId(String orderId);
	
	/**
	 * 根据发票Id删除发票信息
	 * @param invoiceId
	 * @return
	 */
	int deleteByPrimaryKey(List<String> invoiceId);
	
	
	/**
	 * 通过发票id删除发票信息.
	 * @param invoiceId
	 * @return
	 */
	int deleteInvoicesByInvoiceId(String invoiceId);
	
	/**
	 * @param invoiceId
	 * @return
	 */
	List<Invoices> getInvoicesListByOrderId(String orderId);
	
	
	/**
	 * @param invoiceId
	 * @return
	 */
	List<Invoices> getInvoicesAllList();
	
	/**
	 * 查询订单中有指定发票Id的订单编号
	 * @param orderId
	 * @return
	 */
	String getInfoByOrderId(String orderId, String invoicesId);
}